import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';

class AutoBannerView extends StatelessWidget {
  static const List<String> images = ["assets/header.png","assets/header.png","assets/header.png"];
  @override
  Widget build(BuildContext context) {
    return Swiper(
      itemBuilder: (BuildContext context, int index) {
        return PhysicalModel(
          clipBehavior: Clip.antiAlias,
          color: Colors.white,
          borderRadius: BorderRadius.circular(10),
          child: Image.asset(
            images[index],
            fit: BoxFit.cover,
          ),
        );
      },
      autoplay: true,
      itemCount: images.length,
      pagination: SwiperPagination(),
      control: SwiperControl(),
    );
  }
}